var indent_state = "0";
var group_no = getQst("group_no").trim();
var uid = sessionStorage.getItem("u_group_no");
/* 获取订单id */
var request = GetRequest();
var indent_no = request['indent_no'];
var prescription_id = request['prescription_id'];
$(function () {
	var paramJson = {"actName": "GetIndentD","order_id":prescription_id, "utype": "5", "uid": uid, "rand": Math.random() };
	ajaxGet("http://zz.nxk520.com/nethosp/service/nethosp_action.ashx", paramJson, doOk);
	
	
});

//获取数据
	function doOk(rstData) {
		var sum_price=0, str_dd_dtl_html = "";
		if (rstData.list.length > 0 ) {
		   //生成html片段
			var html = template("shopOneself",rstData);
			var container = document.getElementById("shop_oneself");
			//将html片段渲染到界面中
			container.innerHTML = html;
	   }
	   else {
			//生成html片段
			var html = template("noData",rstData);
			var container = document.getElementById("shop_oneself");
			//将html片段渲染到界面中
			container.innerHTML = html;
	   }
	}

//标记配药
function actddpy() {
	var paramJson = {"actName": "DoSendDrug","order_id":prescription_id, "utype": "5", "uid": uid,  "logistics_name": "", "logistics_no": "", "logistics_cost": "", "rand": Math.random() };
	ajaxGet("http://zz.nxk520.com/nethosp/service/nethosp_action.ashx", paramJson, doOkDrug);
}

/* 配药成功 */
function doOkDrug(rstData){
	if (rstData.code == "1") {
			$.alert("订单标记配药成功,已发送消息通知用户到店取药，点击确认返回订单详情", function () { actToPage("shop_oneself.html?prescription_id=" + prescription_id + "&indent_no=" + indent_no); });
	}else {
			$.alert("订单配药异常，错误为：" + rstData.reMsg, "错误", function () { });
	}
}

/* 页面跳转 */
function goOrderDetails(){
	history.back();
}
